package net.knightwatch.kwtools.database;

import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;
import android.util.Log;

public class AutoCompleteQuestionTable {
	private static final String TAG = "AutoCompleteQuestionTable";
	// Database Table
	public static final String TABLE_AUTO_COMPLETE_QUESTIONS = "AutoCompleteQuestions";
	public static final String COLUMN_ID = "_id";
	public static final String COLUMN_QUESTION_ID = "questionId";
	public static final String COLUMN_HINT_TEXT = "hintText";
	
	// Database Creation SQL Statement
	private static final String DATABASE_CREATE = "create table " 
			+ TABLE_AUTO_COMPLETE_QUESTIONS
			+ "("
			+ COLUMN_ID + " integer primary key autoincrement, "
			+ COLUMN_QUESTION_ID + " integer not null,"
			+ COLUMN_HINT_TEXT + " text"
			+ ");";
	
	
	public static void onCreate(SQLiteDatabase database) {
		Log.i(TAG, DATABASE_CREATE);
		try {
			database.execSQL(DATABASE_CREATE);
			// Create the default questions
		} catch (SQLException e){
			Log.v(TAG, e.toString());
		}
	}
	public static void onUpgrade(SQLiteDatabase database, int oldVersion, int newVersion){
		
	}
}
